﻿/*
 * Created by SharpDevelop.
 * User: xieen
 * Date: 2013-08-20
 * Time: 10:31
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections;
using System.Collections.Generic;

namespace GoF23Learning._11.Flyweight_Pattern.Refactor
{
	/// <summary>
	/// Description of Class1.
	/// </summary>
	public class Charactor
	{
		private char chr;		
		
		public char Chr {
			get { return chr; }
			set { chr = value; }
		}
		
		 
		private Dictionary<string,Font> fonttables;
		public Charactor(){
			fonttables = new Dictionary<string, Font>();
		}
		
		public void SetFont(string name,int size,ConsoleColor color)
		{
			Font f = new Font(name,size,color);
			if(fonttables.ContainsKey(name))
				fonttables[name]=f;
			else 
				fonttables.Add(name,f);
			
		}
		
		
		public Font MFont
		{
		
			set{
			if(fonttables.ContainsKey(value.Name))
				fonttables[value.Name]=value;
			else 
				fonttables.Add(value.Name,value);
			}
		}
		
		

		
	}
}
